var myChart = echarts.init(document.getElementById("main"));
var option ={
    title:{
        text:"徐烨程"
    },
    series:[
        {
            type:'graph',
            data:[{
                name: '陈逸华',
                itemStyle: {
                    color: 'green',
                },
                x:10,
                y:40,
            },{
                name: '蔡伟建',
                x:90,
                y:40,
            },{
                name: '王楠',
                x:10,
                y:80,
            },{
                name: '徐烨程',
                x:90,
                y:80,
            }],
            label: {
                show: true,
            },
            symbolSize: 60,
            links: [{
                source: '蔡伟建',
                target: '陈逸华',
                lineStyle: {
                    color: 'green',
                    width: 4,
                },
                label: {
                    show: true,
                    formatter: '沙包人',
                },
                
            },{
                source: '陈逸华',
                target: '王楠',
                lineStyle: {
                    color: 'black',
                    width: 4,
                },
                label: {
                    show: true,
                    formatter: '被健身器材',
                },
                
            },{
                source: '蔡伟建',
                target: '王楠',
                lineStyle: {
                    color: 'yellow',
                    width: 4,
                },
                label: {
                    show: true,
                    formatter: '学习对象',
                },
                
            },{
                source: '徐烨程',
                target: '王楠',
                lineStyle: {
                    color: 'blue',
                    width: 4,
                },
                label: {
                    show: true,
                    formatter: '学习对象',
                },
            },{
                source: '陈逸华',
                target: '徐烨程',
                lineStyle: {
                    color: 'blue',
                    width: 4,
                },
                label: {
                    show: true,
                    formatter: '健身器材',
                },
            },{
                
            }
        ],
        }
    ]
};       
myChart.setOption(option);